import request from '@/utils/request'

/*
* 楼栋用户
* */
// 查询楼栋用户列表
export function listBuildingPerson(query) {
  return request({
    url: '/gcxt/buildingPersonConfig',
    method: 'get',
    params: query
  })
}

// 查询楼栋用户列表
export function userList(query) {
  return request({
    url: '/gcxt/buildingPersonConfig/project/userList',
    method: 'get',
    params: query
  })
}

// 新增楼栋用户
export function addBuildingPerson(data) {
  return request({
    url: '/gcxt/buildingPersonConfig',
    method: 'post',
    data: data
  })
}

// 批量新增楼栋用户
export function batchAddBuildingPerson(data) {
  return request({
    url: '/gcxt/buildingPersonConfig/batchAdd',
    method: 'post',
    data: data
  })
}

// 修改楼栋用户
export function updateBuildingPerson(data) {
  return request({
    url: '/gcxt/buildingPersonConfig',
    method: 'put',
    data: data
  })
}

// 删除楼栋用户
export function delBuildingPerson(id) {
  return request({
    url: '/gcxt/buildingPersonConfig/delete',
    method: 'delete',
    params: { id: id }
  })
}

// 删除楼栋用户
export function getChangeList(id) {
  return request({
    url: '/gcxt/buildingPersonConfig/changeList',
    method: 'get',
    params: { id: id }
  })
}
// 获取用户未完成的任务工序列表
export function getUserNoFinishedTask(query) {
  return request({
    url: '/gcxt/buildingPersonConfig/getUserNoFinishedTask',
    method: 'get',
    params: query
  })
}
// 获取用户未生成的报验单列表
export function findBeforeInspect(query) {
  return request({
    url: '/gcxt/buildingPersonConfig/findBeforeInspect',
    method: 'get',
    params: query
  })
}
export function generateCheckRecord(data) {
  return request({
    url: '/gcxt/buildingPersonConfig/generateCheckRecord',
    method: 'post',
    data: data
  })
}
